package com.itheima.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.reggie.domain.Category;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface CategoryMapper extends BaseMapper<Category> {
    //查询所有分类
    List<Category> findAll();
    //保存
    void save(Category category);
    //修改
    void update(Category category);
    //根据分类id统计当前分类下面是否还有菜品
    int countDishByCategoryId(Long id);
    //根据分类id统计当前分类下面是否有套餐
    int countSetmealByCategoryId(Long id);
    //根据id删除套餐
    void delete(Long id);
}
